package com.lgx.authorize.module.dao;

import java.util.Date;
import java.util.List;


import com.lgx.authorize.module.entity.ApplicationApplykeyInfo;

/**
 * this is a dao to support db service.
 * @author pengdeyi 
 *
 */
public interface IApplicationApplyKeyInfoDao {
	/**
	 * create a application apply info
	 * @param applicationApplykeyInfo
	 */
	void createApplicationApplyKeyInfo(ApplicationApplykeyInfo applicationApplykeyInfo);
	/**
	 * update a application apply info
	 * @param applicationApplykeyInfo
	 */
	void updateApplicationApplykeyInfo(ApplicationApplykeyInfo applicationApplykeyInfo);
	/**
	 * delete a application apply info
	 * @param applicationApplykeyInfo
	 */
	void deleteApplicationApplykeyInfo(ApplicationApplykeyInfo applicationApplykeyInfo);
	
	/**
	 * find apply key by name
	 * @param name
	 * @return
	 */
	ApplicationApplykeyInfo findApplicationApplyKeyInfoByName(String name);
	
	/**
	 * find application apply info by systemid
	 * @param systemid
	 * @return
	 */
	ApplicationApplykeyInfo findApplicationApplykeyInfoBySystemid(int systemid);
	/**
	 * find application apply info by application name and apply key
	 * @param appName
	 * @param key
	 * @return
	 */
	ApplicationApplykeyInfo findApplicationApplykeyInfoByNameKey(String appName,String key);
	/**
	 * find application apply info by application name and apply key and apply date
	 * @param appName
	 * @param key
	 * @param Time
	 * @return
	 */
	ApplicationApplykeyInfo findApplicationApplykeyInfoByNamekeyTime(String appName,String key,Date Time);
	/**
	 * list all application apply informations
	 * @return
	 */
	List<ApplicationApplykeyInfo> listAllApplicationApplykeyInfos();
	/**
	 * list times and construct time type
	 * @param startTime
	 * @param endTime
	 * @param timeType
	 * @return
	 */
	List<ApplicationApplykeyInfo> listApplicationApplykeyInfosByDate(Date startTime,Date endTime,String timeType);
}
